<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../../print.css" type="text/css" media="print">
<meta content="DisplayObjectMaterial,com.derschmale.wick3d.materials.DisplayObjectMaterial,animated,source,transparent,updateBitmapData" name="keywords">
<title>com.derschmale.wick3d.materials.DisplayObjectMaterial</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'DisplayObjectMaterial - Wick3d Documentation';
				var baseRef = '../../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">Wick3d Documentation</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../index-list.html')" href="../../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../../index.html?com/derschmale/wick3d/materials/DisplayObjectMaterial.html&amp;com/derschmale/wick3d/materials/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;DisplayObjectMaterial</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class DisplayObjectMaterial"); titleBar_setSubNav(false,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">com.derschmale.wick3d.materials</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class DisplayObjectMaterial</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">DisplayObjectMaterial <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../../../images/inherit-arrow.gif"> <a href="TextureMaterial.html">TextureMaterial</a> <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../../../images/inherit-arrow.gif"> <a href="AbstractMaterial.html">AbstractMaterial</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Implements</td><td><a href="IMaterial.html">IMaterial</a></td>
</tr>
</table>
<p></p>
  The DisplayObjectMaterial class is a material that uses a DisplayObject as a texture, providing a way to create animated surfaces.
  
  <p></p>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<div class="showHideLinks">
<div class="hideInheritedProperty" id="hideInheritedProperty">
<a onclick="javascript:setInheritedVisible(false,'Property');" href="#propertySummary" class="showHideLink"><img src="../../../../images/expanded.gif" class="showHideLinkImage"> Hide Inherited Public Properties</a>
</div>
<div class="showInheritedProperty" id="showInheritedProperty">
<a onclick="javascript:setInheritedVisible(true,'Property');" href="#propertySummary" class="showHideLink"><img src="../../../../images/collapsed.gif" class="showHideLinkImage"> Show Inherited Public Properties</a>
</div>
</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="AbstractMaterial.html#alpha">alpha</a> : Number<div class="summaryTableDescription">
   The transparency of this material.</div>
</td><td class="summaryTableOwnerCol"><a href="AbstractMaterial.html">AbstractMaterial</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#animated">animated</a> : Boolean<div class="summaryTableDescription">
   Defines whether the source is animated or not.</div>
</td><td class="summaryTableOwnerCol">DisplayObjectMaterial</td>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="TextureMaterial.html#bitmapData">bitmapData</a> : BitmapData<div class="summaryTableDescription">
   The BitmapData object to be used as the texture.</div>
</td><td class="summaryTableOwnerCol"><a href="TextureMaterial.html">TextureMaterial</a></td>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="AbstractMaterial.html#doubleSided">doubleSided</a> : Boolean<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol"><a href="AbstractMaterial.html">AbstractMaterial</a></td>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="AbstractMaterial.html#interactive">interactive</a> : Boolean<div class="summaryTableDescription">
   Defines whether or not the triangles using this material are double sided.</div>
</td><td class="summaryTableOwnerCol"><a href="AbstractMaterial.html">AbstractMaterial</a></td>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="TextureMaterial.html#offsetU">offsetU</a> : Number = 0<div class="summaryTableDescription">
   The horizontal offset in texture space.</div>
</td><td class="summaryTableOwnerCol"><a href="TextureMaterial.html">TextureMaterial</a></td>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="TextureMaterial.html#offsetV">offsetV</a> : Number = 0<div class="summaryTableDescription">
   The vertical offset in texture space.</div>
</td><td class="summaryTableOwnerCol"><a href="TextureMaterial.html">TextureMaterial</a></td>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="TextureMaterial.html#perspectiveCorrection">perspectiveCorrection</a> : Boolean<div class="summaryTableDescription">
   Defines whether the triangles should be subdivided to make the textures look more perspective correct.</div>
</td><td class="summaryTableOwnerCol"><a href="TextureMaterial.html">TextureMaterial</a></td>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="TextureMaterial.html#perspectiveDetail">perspectiveDetail</a> : int<div class="summaryTableDescription">
   The amount of times the triangles should be subdivided iteratively.</div>
</td><td class="summaryTableOwnerCol"><a href="TextureMaterial.html">TextureMaterial</a></td>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="TextureMaterial.html#smooth">smooth</a> : Boolean<div class="summaryTableDescription">
   Defines whether the texture data should be interpolated when mapped.</div>
</td><td class="summaryTableOwnerCol"><a href="TextureMaterial.html">TextureMaterial</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#source">source</a> : DisplayObject<div class="summaryTableDescription">
   The DisplayObject used as the material's texture.</div>
</td><td class="summaryTableOwnerCol">DisplayObjectMaterial</td>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="TextureMaterial.html#tileU">tileU</a> : Number = 1<div class="summaryTableDescription">
   The horizontal downscaling of the texture, so the texture will be tiled.</div>
</td><td class="summaryTableOwnerCol"><a href="TextureMaterial.html">TextureMaterial</a></td>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="TextureMaterial.html#tileV">tileV</a> : Number = 1<div class="summaryTableDescription">
   The vertical downscaling of the texture, so the texture will be tiled.</div>
</td><td class="summaryTableOwnerCol"><a href="TextureMaterial.html">TextureMaterial</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#transparent">transparent</a> : Boolean<div class="summaryTableDescription">
   Defines whether the texture should be transparent or not.</div>
</td><td class="summaryTableOwnerCol">DisplayObjectMaterial</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<div class="showHideLinks">
<div class="hideInheritedMethod" id="hideInheritedMethod">
<a onclick="javascript:setInheritedVisible(false,'Method');" href="#methodSummary" class="showHideLink"><img src="../../../../images/expanded.gif" class="showHideLinkImage"> Hide Inherited Public Methods</a>
</div>
<div class="showInheritedMethod" id="showInheritedMethod">
<a onclick="javascript:setInheritedVisible(true,'Method');" href="#methodSummary" class="showHideLink"><img src="../../../../images/collapsed.gif" class="showHideLinkImage"> Show Inherited Public Methods</a>
</div>
</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#DisplayObjectMaterial()">DisplayObjectMaterial</a>(source:DisplayObject, width:Number = -1, height:Number = -1, animated:Boolean = true, transparent:Boolean = false, smooth:Boolean = false)</div>
<div class="summaryTableDescription">
   Creates a DisplayObjectMaterial instance.</div>
</td><td class="summaryTableOwnerCol">DisplayObjectMaterial</td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="TextureMaterial.html#drawTriangle()">drawTriangle</a>(triangle:<a href="../core/geometry/Triangle3D.html">Triangle3D</a>, target:Graphics):void</div>
<div class="summaryTableDescription">
   Renders a Triangle3D to the target Graphics object.</div>
</td><td class="summaryTableOwnerCol"><a href="TextureMaterial.html">TextureMaterial</a></td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="TextureMaterial.html#getUVCoords()">getUVCoords</a>(x:Number, y:Number, triangle:<a href="../core/geometry/Triangle3D.html">Triangle3D</a>):Point</div>
<div class="summaryTableDescription">
   Retrieves the material's texture coordinates for the 2D viewport coordinates.</div>
</td><td class="summaryTableOwnerCol"><a href="TextureMaterial.html">TextureMaterial</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#updateBitmapData()">updateBitmapData</a>():void</div>
<div class="summaryTableDescription">
   Updates the texture's bitmapData to match the current state of the source DisplayObject.</div>
</td><td class="summaryTableOwnerCol">DisplayObjectMaterial</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="animated"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">animated</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>animated:Boolean</code>&nbsp;&nbsp;[read-write]<p>
   Defines whether the source is animated or not. If true, the texture data is updated with every render. It is recommended to set this property to false whenever there is no animation. 
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get animated():Boolean</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set animated(value:Boolean):void</code>
<br>
</div>
<a name="source"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">source</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>source:DisplayObject</code>&nbsp;&nbsp;[read-write]<p>
   The DisplayObject used as the material's texture.
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get source():DisplayObject</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set source(value:DisplayObject):void</code>
<br>
</div>
<a name="transparent"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">transparent</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>transparent:Boolean</code>&nbsp;&nbsp;[read-write]<p>
   Defines whether the texture should be transparent or not.
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get transparent():Boolean</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set transparent(value:Boolean):void</code>
<br>
</div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="DisplayObjectMaterial()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">DisplayObjectMaterial</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function DisplayObjectMaterial(source:DisplayObject, width:Number = -1, height:Number = -1, animated:Boolean = true, transparent:Boolean = false, smooth:Boolean = false)</code><p>
   Creates a DisplayObjectMaterial instance.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">source</span>:DisplayObject</code> &mdash; The DisplayObject used as the texture.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">width</span>:Number</code> (default = <code>-1</code>)<code></code> &mdash; The width of the source in pixels. If not provided or -1, the current width of the source is used. Provide a different value if the source needs to be clipped or if the current width is smaller than the total width covered by the source over time.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">height</span>:Number</code> (default = <code>-1</code>)<code></code> &mdash; The height of the source in pixels. If not provided or -1, the current height of the source is used. Provide a different value if the source needs to be clipped or if the current height is smaller than the total height covered by the source over time.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">animated</span>:Boolean</code> (default = <code>true</code>)<code></code> &mdash; Defines whether the source is animated or not. If true, the texture data is updated with every render.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">transparent</span>:Boolean</code> (default = <code>false</code>)<code></code> &mdash; Defines whether the texture should be transparent or not.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">smooth</span>:Boolean</code> (default = <code>false</code>)<code></code> &mdash; Defines whether the texture should be smoothed when drawing or not.
   </td>
</tr>
</table>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="updateBitmapData()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">updateBitmapData</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public function updateBitmapData():void</code><p>
   Updates the texture's bitmapData to match the current state of the source DisplayObject.
   </p></div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
